/**
 * Author: CreateSun
 * Date: 2020/8/14
 * Description: 迭代接口
 */
import Vue from "vue";
const service = Vue.prototype.$http;

export const iteration = params => {
  return service({
      url: "iteration/show/list",
      method: 'get',
      params
  })
};

/**
 * 新建一个迭代
 * @param params
 * @returns {AxiosPromise}
 */
export const iterationPost = params => {
    return service({
        url: "iteration/post",
        method: 'post',
        data: params
    })
};

/**
 * 修改迭代信息
 * @param params
 * @returns {AxiosPromise}
 */
export const iterationPut = params => {
    return service({
        url: "iteration/change",
        method: 'put',
        data: params
    })
};


/**
 * 获取迭代详细信息
 * @param params = {projectId}
 * @returns {never}
 */
export const iterationInfo = params => {
    return service({
        url: 'iteration/show',
        method: 'get',
        params
    });
};

/**
 * 删除迭代
 * @param params = {
 *     projectId
 * }
 * @returns {AxiosPromise}
 */
export const delIteration = params => {
    return service({
        url: '/iteration/remove',
        method: 'delete',
        params
    });
};


